<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style/admin.css" />
<link rel="stylesheet" type="text/css" href="style/global.css" />
<script language="javascript" type="text/javascript" src="js/My97DatePicker/WdatePicker.js"></script>
<title>决策管理</title>
</head>

<body>
	<div id="wrap">
    	<div id="public_head"></div>
        <div class="m_search">
          <form action='' method='post'>
        	时间范围 <input class="Wdate" name='bt' type="text" value="<?php echo $bt;?>" onClick="WdatePicker()"> 
        	> <input class="Wdate" name='et' type="text" value="<?php echo $et;?>" onClick="WdatePicker()">
        	 回访人<input type='text' class="qi_text" value="<?php echo $name;?>" name='name'/>
			 客户手机 <input class="qi_text" type="text" value="<?php echo $phone;?>" name="phone"> 
			 方式<select class="select" name="way">
			 		<option value=0 >所有方式</option>
					<option value=1 <?php if(1==$way)echo ' selected '?>>接入</option>
					<option value=2 <?php if(2==$way)echo ' selected '?>>拨出</option>
				</select>
			 <input class="btn_search" name="sub_record" type="submit" value="" />
		  </form>
		</div>
        <div class="m_content">
        	<table class="qi_table" width="0" border="0" cellpadding="0" cellspacing="1">
					<tr>
						<th>回访人</th>
						<th>方式</th>
						<th>客户手机</th>
						<th>开始时间</th>
						<th>结束时间</th>
						<th width="30%">文件链接</th>
						<th>操作</th>
					</tr>
	<?php 
              if(is_array($allcord) && count($allcord)>0){
              	foreach ($allcord as $v){
             ?>
					<tr>
						<td><?php echo str_replace($name, '<font color=red><b>'.$name.'</b></font>&nbsp;', $v['USER_NAME'])?></td>
						<td><?php switch($v['CALL_TYPE']){case 2:echo '拨出';break;default:echo '<font color="green">接入</font>';}?></td>
						<td><?php echo str_replace($phone, '<font color=red><b>'.$phone.'</b></font>&nbsp;', $v['TEL_NO'])?></td>
						<td><?php echo date('Y-m-d H:i:s',strtotime($v['START_TIME']))?></td>
						<td><?php echo date('Y-m-d H:i:s',strtotime($v['END_TIME']))?></td>
						<td><?php echo $v['FILE_PATH'].'/'.$v['FILE_NAME']?></td>
						<td><a class='play_cord' href="/index.php?c=recordmsg&a=record_play&id=<?php echo $v['ID']?>">播放</a></td>
				</tr>
	<?php 
              	}
              }else{
            ?>
              <tr height="40"><td style="text-align:center;color:green;" colspan='10'>没有您搜索的结果</td></tr>
             <?php 
              }
             ?>
              <tr><td colspan='10'>
					<?php 
						$url = '/index.php?c='.$_REQUEST['c'].'&a='.$_REQUEST['a'].'&p=_num_&name='.urlencode($name).'&phone='.$phone.'&bt='.$bt.'&et='.$et.'&way='.$way;
						echo JYTools::pager($url,$tolNum,$page,$pagesize);
					?>
			  </td></tr>
            </table>
        </div>
    </div>
</body>
</html>
<script src="/js/xheditor/jquery/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="/js/boot.js"></script>
<script src="/js/tip.js"></script>
<script src="/js/add_public_head.js" type="text/javascript"></script>
<script>
$('.play_cord').click(function(){
	var url = $(this).attr('href')
	window.open(url,'newwindow','height=250,width=260,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no')
	return false;
})
</script>